package com.spring.demo.web;/**
 * Created by liujun on 2018/6/1.
 */

import com.spring.demo.repository.UserRepository;
import com.spring.demo.vo.UserVo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @author Administrator
 * @create 2018-06-01 17:49
 */
@Controller
@RequestMapping("/user")
public class LoginController {

    @Autowired
    private UserRepository userRepository;

    @RequestMapping("/index")
    public String index(){
        List<UserVo> userVos=userRepository.findAll();
        return "hello";
    }
}
